package com.design.yjx.proxy.remote;

import java.rmi.Naming;

/**
 * @author yuanjianxin
 * @date 2017/8/25 14:37
 */
public class ClientMain {
    public static void main(String[] args) throws Exception {
        String[] location = {"rmi://192.168.1.45:9991/remote1",
                "rmi://192.168.1.45:9992/remote2",
                "rmi://192.168.1.45:9993/remote3"};

        for (String s : location) {
            GumballMachineRemote remote = (GumballMachineRemote) Naming.lookup(s);
            GumballMonitor monitor = new GumballMonitor(remote);
            monitor.report();
        }

    }
}
